﻿using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(MapEditorPanel))]
public class EditorMapPanel : Editor
{
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        MapEditorPanel mapEditorPanel = (MapEditorPanel) target;


        if (GUILayout.Button("添加 AreaPanelView"))
        {
            mapEditorPanel.CreatAreaPanel();
            Debug.Log("创建成功");
        }
        
        
        //点击创建的
        if (GUILayout.Button("保存"))
        {
            mapEditorPanel.SaveFile();
            Debug.Log("保存成功");
        }
        
        if (GUILayout.Button("读取集合中的"))
        {
            mapEditorPanel.ReadAll();
            Debug.Log("读取成功");
        }

    }
}
